pub fn dp_rec_mc(amount: u32) -> u32 {
    // 可用的纸币面额
    let coins = vec![1, 2, 5, 10, 20, 30, 50, 100];
    
    // 创建dp数组，初始化为最大值
    let mut dp = vec![u32::MAX; (amount + 1) as usize];
    
    // 基础情况：金额为0时需要0张纸币
    dp[0] = 0;
    
    // 对每个金额进行动态规划
    for i in 1..=amount as usize {
        // 尝试每种面额的纸币
        for &coin in coins.iter() {
            if coin as usize <= i {
                // 如果dp[i - coin]是有效值
                if dp[i - coin as usize] != u32::MAX {
                    // 更新当前金额需要的最小纸币数
                    dp[i] = dp[i].min(dp[i - coin as usize] + 1);
                }
            }
        }
    }
    
    // 如果找不到解返回0，否则返回最小纸币数
    if dp[amount as usize] == u32::MAX {
        0
    } else {
        dp[amount as usize]
    }
}
